<?php
	global $current_controller;

	//menu
	echo "
		<div class='clear mainmenu-wrap'>
        	<!--<a href = '/' class='fl_left'><img src='".SITE_IMAGES."edie-logo1.gif' alt='".Language::Get('Project name')."' width='384' height='48' /></a>-->
            <div class='soc-wrap'>
            	<!--<a href='#' class='btn-tweet' target = '_blank'>Twitter</a>-->
                <a href='http://www.facebook.com/anton.perkin' class='btn-fb' target = '_blank'>Facebook</a>
            </div>
            <ul class='mainmenu fl_right'>";
	
		    //menu
		    foreach (Menus::$site_global as $menuKey => $menuValue)
		    {
		    	//check
				if (($menuValue['in_header'] === false) || (empty(HTTPContext::$session['customer']) && $menuValue['is_private'] === true))
				{
					continue;
				}
				
	    		//checks whether the current link is active and sets the appropriate CSS class
				$itemClass = ($menuKey == $current_controller->module) ? 'active' : '';					
		    	   	
				//menu item
		    	echo "<li class = '$itemClass'>";
		    		HtmlsHelper::Link($menuValue['url'], $menuValue['text'], $menuValue['html_attributes']);
		    	echo '</li>';
		    }

    echo "	</ul>
    	</div>";
    
    //TODO: search
//	echo "
//		<div class='search-form-box white-corners'>
//			<form class='search-form' action='#' method='get'>
//				<fieldset>
//					<label for='search-q' class='search-label'>".Language::Get('Search')."</label>
//					<select class='search-area'>
//						<option value='1'>".Language::Get('Points')."</option>
//					</select>
//					<input id='search-q' class='fldtext' type='text' />
//					<!-- input class='search-submit-btn' type='submit' value='Go' / -->
//					<a class='edit-box' href='#'>".Language::Get('OK')."</a>
//				</fieldset>
//			</form>			
//		</div>	
//	";
?>